This invention relates to three-dimensional (3D) graphics systems and more particularly to apparatus and methods for detecting thin lines in 3D graphics systems.
Aliasing refers to the distortions that occur when a computer graphic is rendered at a resolution other than the original resolution. Anti-aliasing refers to the techniques used to minimize the effects, or distortions, of aliasing. Anti-aliasing is a common technique to improve image quality for graphics and other image-based applications. There are many conventional methods to address image quality and the cost of anti-aliasing. Three of these conventional methods for full scene anti-aliasing in computer graphics applications are: accumulation buffer (A-buffer) anti-aliasing, supersample anti-aliasing, and multisample anti-aliasing (MSAA). A-buffer anti-aliasing uses an algorithm for polygon edge anti-aliasing. Since A-buffer anti-aliasing is not a complete solution to the aliasing problem, it is not widely used.
Supersample and multisample anti-aliasing are used for complete full-scene anti-aliasing. In computer graphics, full-scene anti-aliasing deals with the aliasing issues at the edge of an object and at the intersection of interpenetrating objects. Supersample anti-aliasing is implemented by rendering a scene at a higher resolution and then down-converting to a lower resolution output. In order to render the scene at a higher resolution, subsamples are used by taking more samples than would ordinarily be used for a single pixel. Mulitsample anti-aliasing is similar to supersample anti-aliasing, except that it is achieved at least partially through hardware optimization. In general, multisample anti-aliasing is less computationally complex than supersample anti-aliasing at the same performance and quality levels because of the hardware optimizations. Therefore, multisample anti-aliasing, instead of supersample anti-aliasing, is typically implemented in most modern computer graphics systems.
For supersample and multisample anti-aliasing, the quality of the image is highly dependent on the number of samples or subsamples used. Using a larger number of samples or subsamples gives a higher quality image. However, using a larger number of samples or subsamples consumes more memory resources for storing the samples. Additionally, using a larger number of samples or subsamples consumes significant computational resources of a central processing unit (CPU) or graphics processing unit (GPU).
Despite its advantages, anti-aliasing techniques tend to work best for relatively large areas having a uniform or substantially uniform color. Thin lines (e.g., lines having a width of one pixel or less), very small areas, very small fonts, or the like may tend to dissolve into the background (i.e., become blurry) when filtered by various anti-aliasing algorithms. Thus, it may be advisable to exclude thin lines or other small features from processing by anti-aliasing algorithms. In view of the foregoing, what are needed are apparatus and methods to efficiently detect thin lines so they may be excluded from processing by anti-aliasing algorithms.